﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RemoveCharacter
{
    public static class StringExtension
    {
        /// <summary>
        /// Assuming your inputs are all lowercase/uppercase
        /// </summary>
        /// <param name="input"></param>
        /// <param name="c"></param>
        /// <returns></returns>
        public static string RemoveCharacter(this string input, char c)
        {
            string result = string.Empty;            
            
            if (input.Length <= 0)
                return result;

            for (int i = 0; i < input.Length; i++)
            {
                if (input[i] != c)
                    result += input[i];
            }

            return result;
        }
        
    }
}
